#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "structures.h"


int pow(int a, int b) {
    int i ;
    int exp = a;
    if (b == 0 ) return 1;
    for (i = 1; i <b;i++)
        exp = exp*a;

return exp;
}



int bit_libre( char c) {

    int i = 0;
    while ( i<=7 ) {
        if (!((c>>i)&1)) return i;
        i = i +1;
    }
   return 8;
}

